You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): Antigravity's Gemini 4 Hydrogen (High) usage is no longer unpriced - #40901
Antigravity records Gemini 4 Hydrogen (High) as gemini-4-hydrogen-tiered-high. Usage prices an effort or routing variant at its base model's rate by stripping the suffix, but it stripped only the last one: this name looked up gemini-4-hydrogen-tiered, found no rate, and showed as Unpriced, adding $0 to the estimated cost. Its tokens were counted; only the cost was missing.
Change
antigravityRateModel strips stacked effort and routing suffixes one at a time and checks the known aliases after each step, so gemini-4-hydrogen-tiered-high prices at the gemini-4-hydrogen rate and an alias keeps its rate under a suffix (gemini-3-flash-agent-high prices as gemini-3.5-flash, not gemini-3-flash-preview). Names that priced before, the model name Usage shows and the token totals stay as they were.
Scope
A small fix for an obvious bug, so no issue. Open PR #39852 edits the same suffix pattern (it adds -xhigh and -extra-high); whichever merges second needs a one-line rebase.
Verification
Extended the existing test prices ACP effort variants at the base model rate with gemini-4-hydrogen-tiered-high and gemini-3-flash-agent-high, and a price check for the Hydrogen record. On main the new rows map to gemini-4-hydrogen-tiered and gemini-3-flash-agent and the record is unpriced; with the fix the test passes.
Ran the real readAntigravityUsage and priceUsage on main and on this branch over snapshots of my own Antigravity conversation databases. The only difference: 29 calls (0.42M tokens) recorded as gemini-4-hydrogen-tiered-high were Unpriced on main and price at the gemini-4-hydrogen rate here. No other model's records or prices changed.
The suffixes are stripped in a loop, not by recursion: a malformed name with 100,000 stacked suffixes resolves in about 5 ms.
vp run check:changed: format, lint, knip, graphql, typecheck and tests pass.
Created with Claude Opus 5.5 in Claude Code, running in T3 Code. Reviewed by GPT-6.2 Sol in Codex, Claude Opus 5.5 in Claude Code, Orchestrator (Neon) in Antigravity and DeepSeek V4.1 Flash in OpenCode.
No actionable comments were generated in the recent review.
Walkthrough
The Antigravity usage reader now resolves stacked model variant suffixes iteratively and applies aliases during resolution. Tests cover Hydrogen tiered-high and Flash agent-high mappings, including Hydrogen tiered-high pricing.
Changes: Antigravity rate resolution
Layer / File(s)
Summary
Variant resolution and pricing tests apps/server/src/provider/Drivers/antigravityUsageReader.ts, apps/server/src/provider/Drivers/antigravityUsageReader.test.ts
The reader repeatedly removes recognized suffixes and checks aliases after each removal. Tests verify the Hydrogen tiered-high and Flash agent-high rate mappings, and assert a Hydrogen tiered-high cost of 19e-6.
This change prices Antigravity usage for stacked model suffixes such as gemini-4-hydrogen-tiered-high, which previously contributed $0 to estimated cost. Tests cover the new mappings and the Hydrogen price. No concrete merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Antigravity's Gemini 4 Hydrogen (High) usage was unpriced and is now priced. It matches the changeset, which strips stacked variant suffixes so that gemini-4-hydrogen-…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in with specific content. The Problem section states the expected behavior and the bu…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: Antigravity's Gemini 4 Hydrogen (High) usage was unpriced and is now priced. It matches the changeset, which strips stacked variant suffixes so that gemini-4-hydrogen-tiered-high resolves to the gemini-4-hydrogen rate. The title follows conventional commit form and is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in with specific content. The Problem section states the expected behavior and the bug. The Change section explains the iterative suffix stripping and alias handling. The Scope section explains why no issue is linked and notes the related open PR. The Verification section lists the extended test, the snapshot comparison with observed results, the loop-performance check, and the repo check run. The template's agent attribution line is present at the end. The Scope section does not link an issue, but it gives the reason for having none, which the template allows for small obvious fixes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Antigravity records Gemini 4 Hydrogen (High) as
gemini-4-hydrogen-tiered-high. Usage prices an effort or routing variant at its base model's rate by stripping the suffix, but it stripped only the last one: this name looked upgemini-4-hydrogen-tiered, found no rate, and showed as Unpriced, adding $0 to the estimated cost. Its tokens were counted; only the cost was missing.Change
antigravityRateModelstrips stacked effort and routing suffixes one at a time and checks the known aliases after each step, sogemini-4-hydrogen-tiered-highprices at thegemini-4-hydrogenrate and an alias keeps its rate under a suffix (gemini-3-flash-agent-highprices asgemini-3.5-flash, notgemini-3-flash-preview). Names that priced before, the model name Usage shows and the token totals stay as they were.Scope
A small fix for an obvious bug, so no issue. Open PR #39852 edits the same suffix pattern (it adds
-xhighand-extra-high); whichever merges second needs a one-line rebase.Verification
prices ACP effort variants at the base model ratewithgemini-4-hydrogen-tiered-highandgemini-3-flash-agent-high, and a price check for the Hydrogen record. Onmainthe new rows map togemini-4-hydrogen-tieredandgemini-3-flash-agentand the record is unpriced; with the fix the test passes.readAntigravityUsageandpriceUsageonmainand on this branch over snapshots of my own Antigravity conversation databases. The only difference: 29 calls (0.42M tokens) recorded asgemini-4-hydrogen-tiered-highwere Unpriced onmainand price at thegemini-4-hydrogenrate here. No other model's records or prices changed.vp run check:changed: format, lint, knip, graphql, typecheck and tests pass.Created with Claude Opus 5.5 in Claude Code, running in T3 Code. Reviewed by GPT-6.2 Sol in Codex, Claude Opus 5.5 in Claude Code, Orchestrator (Neon) in Antigravity and DeepSeek V4.1 Flash in OpenCode.